import java.io.IOException;


/**
 * 安装jar
 * @author ls
 *
 */
public class MvnInstall extends BaseMvn{

	public MvnInstall(String jafPath) {
		super(jafPath);
	}

	public static void main(String args[]) throws IOException {
		String jarName = "E:/workspace1/data/lib/auth-data-service-0.0.1-SNAPSHOT.jar";
		jarName = "E:/workspace1/data/lib/";
		MvnInstall f = new MvnInstall(jarName);
		f.exe( );
	}


	@Override
	public  void exe(POM pom){
		StringBuilder sb = new StringBuilder();
		sb.append("cmd /r mvn clean install:install-file ");
		sb.append(this.getCommonOrder(pom));
		Runtime runtime = Runtime.getRuntime();
		try {
			System.out.println("执行命令："+sb.toString());
			runtime.exec(sb.toString());
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
}
